<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script th:src="@{../public/js/jquery-3.3.1.js1}"></script>
<h1>账号注册</h1>
    <form action="login" method="get">
       用户名：<input type="text" name="username" placeholder="请输入用户名" />
        密码<input type="password" name="password" placeholder="请输入密码" />
        输入名字：<input type="text" name="nickname" placeholder="请输入名字">
        <input type="submit" value="注册"/>

    </form>
<script th:inline="javascript">

        function checksubmit(){
            var pw = document.getElementById("pw").nodeValue;
            var pw1 = document.getElementById("pw1").nodeValue;
            // if(name!=''){
            //     return true;
            // }else{
            //     alert("请输入密码");
            // }
            if(pw!=pw1){
                alert("两次输入的密码不一样");
                return false;
            }
        }


</script>
</body>
</html>